<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Title</title>
	<style>
		div{
			width: 100px;
			height: 100px;
			background: aqua;
			transition: all 2s;
			position: fixed;
			bottom: 20px;
			left: 50%;
			margin-left: -50px;
			animation: loop 2s linear 0s infinite alternate;
		}
		@keyframes loop {
			0%    {
				bottom: 20px
			}
			50% {
				bottom: 40px;
			}
			100%  {
				bottom: 20px;
			}
		}
	</style>
</head>
<body>
<div></div>
<script>

</script>
</body>
</html>